package com.zmn.oms.business.interfaces.work.tag;

import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.dto.tag.OrderTagAddDTO;
import com.zmn.oms.model.entity.work.OrderWork;

/**
 * @author sunlife
 * @date:2021/8/18 10:54 上午
 * description:
 */
public interface OrderTagBService {
    /**
     * 同步订单标签信息
     *
     * @param orderId 订单号
     * @param workId  工单号
     */
    void modifyOrderTagByLogType(Long orderId, Long workId, Integer logType);

	/**
	 * 添加订单标签
	 *
	 * @param orderTagAddDTO
	 * @throws OmsBaseException
	 */
	void addOrderTag(OrderTagAddDTO orderTagAddDTO) throws OmsBaseException;

	/**
	 * 自动流转添加订单标签
	 *
	 * @param orderWork
	 */
	void autoAddOrderTag(OrderWork orderWork);


	/**
	 * 检查工单是否有指定的标签分类
	 *
	 * @param orderId
	 * @param workId
	 * @param categoryId 标签分类id
	 * @return
	 */
	Boolean existsCategoryTagByCategoryId(Long orderId, Long workId, Integer categoryId);

    /**
     * 发送订单标签mq
     * @param orderId
     * @param workId
     * @param logType
     */
    void sendOrderTagMq(Long orderId, Long workId, Integer logType);

	/**
	 * 类描述：指定时间内， 派给工程师的同用户的订单中，是否有有效联系
	 *
	 * @author  liuying
	 * @date   2022/05/05 12:45
	 */
	boolean existContactEffectiveTagOrderByExcludeOrderId(Long orderId, Long workId);
}
